package controller.threadpool.testutil;

import org.act.xs.wsr.xc.framework.IConnector;
import org.act.xs.wsr.xc.framework.dispatch.ISafeTask;
import org.act.xs.wsr.xc.framework.dispatch.ITaskFactory;
import org.act.xs.wsr.xc.threadpool.ThreadPool;



public class OneStageTaskFactory implements ITaskFactory<Object> {

	private final ThreadPool nextStage;;
	private final int stageId;
	
	public OneStageTaskFactory(ThreadPool nextStage, int stageId) {
		super();
		this.nextStage = nextStage;
		this.stageId = stageId;
	}
	
	public ISafeTask createSafeTask(Object arg0) {
		return new OneStageTask(stageId,arg0,nextStage);
	}

	public IConnector<?, ?> getConnector() {
		return null;
	}
}
